package com.jack.vipmis.vip.wei.web.controller;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import com.jack.vipmis.common.entity.enums.BooleanEnum;
import com.jack.vipmis.common.web.controller.BaseCRUDController;
import com.jack.vipmis.vip.wei.entity.Circle;

/**
 * 微贴控制器
 * 
 * @author JackLiang
 * @date 2014-7-2
 * @version 1.0
 */
@Controller
@RequestMapping(value = "/wei/circle/circle")
public class CircleController extends BaseCRUDController<Circle, Long> {

	public CircleController() {
		setResourceIdentity("wei:circle");
	}

	@Override
	protected void setCommonData(Model model) {
		model.addAttribute("booleanList", BooleanEnum.values());
	}

	/**
	 * 
	 * @param id
	 * @return
	 */
	@RequestMapping(value = "reply/{id}", method = RequestMethod.GET)
	public String replyCircle(Model model, @PathVariable("id") long id) {
		this.permissionList.assertHasViewPermission();
		model.addAttribute("tid", id);
		return "wei/circle/circle/replyForm";
	}

}
